import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JToggleButton;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


public class HomePageFaculty extends JFrame {
	private final ButtonGroup buttonGroup = new ButtonGroup();

	/**
	 * Create the panel.
	 */
	public HomePageFaculty(final String user) {
		getContentPane().setBackground(Color.ORANGE);
		getContentPane().setLayout(null);
		
		JLabel lblHomepage = new JLabel("HOMEPAGE");
		lblHomepage.setFont(new Font("Arial", Font.BOLD, 18));
		lblHomepage.setBounds(195, 39, 164, 29);
		getContentPane().add(lblHomepage);
		
		final JRadioButton rdbtnPersonalInformation = new JRadioButton("Personal Information");
		buttonGroup.add(rdbtnPersonalInformation);
		rdbtnPersonalInformation.setBounds(116, 107, 188, 24);
		getContentPane().add(rdbtnPersonalInformation);
		
		final JRadioButton rdbtnFacultytServices = new JRadioButton("Faculty Services");
		buttonGroup.add(rdbtnFacultytServices);
		rdbtnFacultytServices.setBounds(116, 162, 141, 23);
		getContentPane().add(rdbtnFacultytServices);
		
		JButton btnNext = new JButton("NEXT");
		btnNext.addActionListener(new ActionListener(){
			 public void actionPerformed(ActionEvent e)
	            {
				 if (rdbtnFacultytServices.isSelected()){
					 dispose();
					 new FacultyServices(user);
				 }
				 else if(rdbtnPersonalInformation.isSelected()){
					 dispose();
					 new FacPersonalInfo(user);
				 }
	            }
		});
		btnNext.setBounds(72, 245, 117, 29);
		getContentPane().add(btnNext);
		
		JButton btnLogout = new JButton("LOGOUT");
		btnLogout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			dispose();
			new LogIn();
			}
		});
		btnLogout.setBounds(314, 245, 117, 29);
		getContentPane().add(btnLogout);
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon(HomePageFaculty.class.getResource("/resources/p-331002-georgia-tech-yellow-jackets-black-spare-tire-cover-jt-2324558420.jpg")));
		label.setBounds(453, 22, 226, 183);
		getContentPane().add(label);
		setPreferredSize(new Dimension(700, 300));
		pack();
		setVisible(true);
		setTitle("Faculty Services");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}
}
